﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Web;

namespace Nova_Common
{
    public class LoginLogic
    {
        string strUserNo = "";
        public static void IsLogin()
        {
            HttpCookie Cookie = HttpContext.Current.Request.Cookies["vNovaUserNo"];
            if (Cookie == null || Cookie != null && Cookie.Value.ToString() == "")
            {
                HttpContext.Current.Response.Redirect("~/Default.aspx");
            }
        }

        public string BackNovaUserNo()
        {
            HttpCookie Cookie = HttpContext.Current.Request.Cookies["vNovaUserNo"];
            if (Cookie == null || Cookie != null && Cookie.Value.ToString() == "")
            {
                HttpContext.Current.Response.Redirect("~/Default.aspx");
            }
            else
            {
                strUserNo = Cookie.Value.ToString();
            }
            return strUserNo;
        }
    }
}
